package vn.wallet.app.managedBean.process;

import java.io.Serializable;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;

@ManagedBean(name = "leftprocess")
@ViewScoped
public class LeftMenuProcess implements Serializable {

	/**
	 * 
	 */
	private static final long	serialVersionUID	= 1L;
	private final CenterProcess	cp;

	// -------------------------properties

	public LeftMenuProcess() {
		FacesContext context = FacesContext.getCurrentInstance();
		cp = context.getApplication().evaluateExpressionGet(context,
				"#{centerprocess}", CenterProcess.class);
	}

	public void loadDashboardPage() {
		cp.setModulePath("/app/module/dashboard.xhtml");
	}

	public void loadBudgetPage() {
		cp.setModulePath("/app/module/budget.xhtml");
	}

	public void loadRecordPage() {
		cp.setModulePath("/app/module/record.xhtml");
	}

	public void loadTransaction() {
		cp.setModulePath("/app/module/transaction.xhtml");
	}

	public void loadCategory() {
		cp.setModulePath("/app/module/category.xhtml");
	}

	public void loadCurrency() {
		cp.setModulePath("/app/module/currency.xhtml");
	}

	public void loadContactPage() {
		cp.setModulePath("/app/module/contact.xhtml");
	}

	public void loadCategoryPage() {
		cp.setModulePath("/app/module/category.xhtml");
	}

	public void loadExpensePage() {
		cp.setModulePath("/app/module/expense.xhtml");
	}

	public void loadIncomePage() {
		cp.setModulePath("/app/module/income.xhtml");
	}

	public void loadReportPage() {
		cp.setModulePath("/app/module/report.xhtml");
	}
}
